<form id="quickReservation" action="<?= $ro->gen('reservation.quick') ?>" method="get">
	<fieldset>
		<legend>Szybka rezerwacja</legend>
		<ul class="fields">
			<li>
				<label for="quickReservation-hall"><kbd>S</kbd>ala:</label>
				<select id="quickReservation-hall" name="hall" accesskey="s" title="Sala">
					<? foreach ($t['halls'] as $hall): ?>
					<option value="<?= $hall['id'] ?>"><?= e($hall['name']) ?></option>
					<? endforeach ?>
				</select>
			</li>
			<li>
				<ul class="horizontal">
					<li>
						<label for="reservation-date"><kbd>D</kbd>ata: <span>YYYY-MM-DD</span></label>
						<input id="reservation-date" name="date" class="date" type="text" value="" maxlength="10" accesskey="d" title="Data"/>
					</li>
					<li>
						<label for="reservation-from">Od: <span>HH:SS</span></label>
						<input id="reservation-from" name="from" class="time" type="text" value="" maxlength="5" />
					</li>
					<li>
						<label for="reservation-to">Do: <span>HH:SS</span></label>
						<input id="reservation-to" name="to" class="time" type="text" value="" maxlength="5" />
					</li>
				</ul>
			</li>
				<li>
					<ul class="actions">
						<li><input type="submit" value="Rezerwuj salę" /></li>
					</ul>
				</li>
		</ul>
	</fieldset>
</form>
<fieldset id="latestReservations">
	<legend>Ostatnie rezerwacje</legend>
	<? if (empty($t['reservations'])): ?>
	<p>Aktualnie nie masz żadnych rezerwacji.</p>
	<? else: ?>
	<table>
		<thead>
			<tr>
				<th>Sala</th>
				<th>Data</th>
				<th>Od</th>
				<th>Do</th>
				<th>Akcje</th>
			</tr>
		</thead>
		<tbody>
			<? foreach ($t['reservations'] as $reservation): ?>
			<tr class="status-<?= $reservation['status'] ?>">
				<td><a href="<?= $ro->gen('hall.read', array('id' => $reservation['hallId'])) ?>"><?= e($reservation['hall']) ?></a></td>
				<td><?= $tm->_d((int)$reservation['fromTime'], 'medium_date') ?></td>
				<td><?= $tm->_d((int)$reservation['fromTime'], 'short_date') ?></td>
				<td><?= $tm->_d((int)$reservation['toTime'], 'short_date') ?></td>
				<td class="actions"><a href="<?= $ro->gen('reservation.read', array('hall' => $reservation['hallId'], 'id' => $reservation['id'])) ?>">Pokaż</a></td>
			</tr>
			<? endforeach ?>
		</tbody>
	</table>
	<? endif ?>
</fieldset>
<br style="clear: left;"/>